<div>
    <div v-if="filterFields.length > 0" class="filter-group">
        <filter-tree :datas="filterItems" :fields="filterFields">
            <template slot-scope="{ data }">
                <template v-if="Object.is(data.editor, 'titlelike')">
                    <input-box 
    v-model="data.titlelike"  
    @enter="onEnter($event)"  
      
    :disabled="detailsModel.titlelike.disabled" 
    type='text' 
    style="width:100px;">
</input-box>

                </template>
                <template v-if="Object.is(data.editor, 'typeeq')">
                    
<dropdown-list 
    v-model="data.typeeq"
    :data="data"
    :context="context"
    :formState="formState"
    :viewparams="viewparams"
    :localContext='{ }' 
    :localParam='{ }' 
    :disabled="detailsModel.typeeq.disabled"
    valueType="string"
    tag="Testcase__type"
    codelistType="STATIC"
    placeholder="请选择..."
    style="width:100px;"
></dropdown-list>
                </template>
                <template v-if="Object.is(data.editor, 'prieq')">
                    
<dropdown-list 
    v-model="data.prieq"
    :data="data"
    :context="context"
    :formState="formState"
    :viewparams="viewparams"
    :localContext='{ }' 
    :localParam='{ }' 
    :disabled="detailsModel.prieq.disabled"
    valueType="number"
    tag="Testcase__pri"
    codelistType="STATIC"
    placeholder="请选择..."
    style="width:100px;"
></dropdown-list>
                </template>
                <template v-if="Object.is(data.editor, 'status1eq')">
                    
<app-span name='status1eq' :value="data.status1eq" tag='TestCaseStatusGrid' codelistType='STATIC' :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }'  :localParam ='{ }'    style="width:100px;"
>  
</app-span>

                </template>
                <template v-if="Object.is(data.editor, 'assignedtoeq')">
                    
<dropdown-list 
    v-model="data.assignedtoeq"
    :data="data"
    :context="context"
    :formState="formState"
    :viewparams="viewparams"
    :localContext='{ }' 
    :localParam='{ }' 
    :disabled="detailsModel.assignedtoeq.disabled"
    valueType="string"
    tag="UserRealName"
    codelistType="DYNAMIC"
    placeholder="请选择..."
    style="width:100px;"
></dropdown-list>
                </template>
                <template v-if="Object.is(data.editor, 'brancheq')">
                    
<dropdown-list 
    v-model="data.brancheq"
    :data="data"
    :context="context"
    :formState="formState"
    :viewparams="viewparams"
    :localContext='{ }' 
    :localParam='{ }' 
    :disabled="detailsModel.brancheq.disabled"
    valueType="number"
    tag="ProductBranch"
    codelistType="DYNAMIC"
    placeholder="请选择..."

></dropdown-list>
                </template>
                <template v-if="Object.is(data.editor, 'coloreq')">
                    
<dropdown-list 
    v-model="data.coloreq"
    :data="data"
    :context="context"
    :formState="formState"
    :viewparams="viewparams"
    :localContext='{ }' 
    :localParam='{ }' 
    :disabled="detailsModel.coloreq.disabled"
    valueType="string"
    tag="Testcase__color"
    codelistType="STATIC"
    placeholder="请选择..."
    style="width:100px;"
></dropdown-list>
                </template>
                <template v-if="Object.is(data.editor, 'frameeq')">
                    
<dropdown-list 
    v-model="data.frameeq"
    :data="data"
    :context="context"
    :formState="formState"
    :viewparams="viewparams"
    :localContext='{ }' 
    :localParam='{ }' 
    :disabled="detailsModel.frameeq.disabled"
    valueType="string"
    tag="Testcase__frame"
    codelistType="STATIC"
    placeholder="请选择..."
    style="width:100px;"
></dropdown-list>
                </template>
                <template v-if="Object.is(data.editor, 'frequencyeq')">
                    
<dropdown-list 
    v-model="data.frequencyeq"
    :data="data"
    :context="context"
    :formState="formState"
    :viewparams="viewparams"
    :localContext='{ }' 
    :localParam='{ }' 
    :disabled="detailsModel.frequencyeq.disabled"
    valueType="string"
    tag="Case__frequency"
    codelistType="STATIC"
    placeholder="请选择..."
    style="width:100px;"
></dropdown-list>
                </template>
                <template v-if="Object.is(data.editor, 'frombugeq')">
                    
<dropdown-list 
    v-model="data.frombugeq"
    :data="data"
    :context="context"
    :formState="formState"
    :viewparams="viewparams"
    :localContext='{ }' 
    :localParam='{ }' 
    :disabled="detailsModel.frombugeq.disabled"
    valueType="number"
    tag="AllBug"
    codelistType="DYNAMIC"
    placeholder="请选择..."

></dropdown-list>
                </template>
                <template v-if="Object.is(data.editor, 'fromcaseideq')">
                    
<dropdown-list 
    v-model="data.fromcaseideq"
    :data="data"
    :context="context"
    :formState="formState"
    :viewparams="viewparams"
    :localContext='{ }' 
    :localParam='{ }' 
    :disabled="detailsModel.fromcaseideq.disabled"
    valueType="number"
    tag="AllCase"
    codelistType="DYNAMIC"
    placeholder="请选择..."

></dropdown-list>
                </template>
                <template v-if="Object.is(data.editor, 'lastrunnereq')">
                    
<dropdown-list 
    v-model="data.lastrunnereq"
    :data="data"
    :context="context"
    :formState="formState"
    :viewparams="viewparams"
    :localContext='{ }' 
    :localParam='{ }' 
    :disabled="detailsModel.lastrunnereq.disabled"
    valueType="string"
    tag="UserRealName_Gird"
    codelistType="DYNAMIC"
    placeholder="请选择..."

></dropdown-list>
                </template>
                <template v-if="Object.is(data.editor, 'lastrunresult1eq')">
                    
<app-span name='lastrunresult1eq' :value="data.lastrunresult1eq" tag='Testcase__result' codelistType='STATIC' :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }'  :localParam ='{ }'    style="width:100px;"
>  
</app-span>

                </template>
                <template v-if="Object.is(data.editor, 'libnameeq')">
                    
<app-picker  
    :formState="formState"
    :data="data"
    :context="context"
    :viewparams="viewparams"
    :localContext ='{ }' 
    :localParam ='{ }' 
    :disabled="detailsModel.libnameeq.disabled"
    name="libnameeq"
    deMajorField="name"
    deKeyField="testsuite"
    :service="service"
    :acParams="{ serviceName: 'TestSuiteService', interfaceName: 'FetchDefault'}"
    valueitem=""
    :value="data.libnameeq"
    editortype="dropdown"
    style=""
    @formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
                </template>
                <template v-if="Object.is(data.editor, 'libnamelike')">
                    
<app-picker  
    :formState="formState"
    :data="data"
    :context="context"
    :viewparams="viewparams"
    :localContext ='{ }' 
    :localParam ='{ }' 
    :disabled="detailsModel.libnamelike.disabled"
    name="libnamelike"
    deMajorField="name"
    deKeyField="testsuite"
    :service="service"
    :acParams="{ serviceName: 'TestSuiteService', interfaceName: 'FetchDefault'}"
    valueitem=""
    :value="data.libnamelike"
    editortype="dropdown"
    style=""
    @formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
                </template>
                <template v-if="Object.is(data.editor, 'modulenameeq')">
                    
<app-picker  
    :formState="formState"
    :data="data"
    :context="context"
    :viewparams="viewparams"
    :localContext ='{ }' 
    :localParam ='{ }' 
    :disabled="detailsModel.modulenameeq.disabled"
    name="modulenameeq"
    deMajorField="name"
    deKeyField="module"
    :service="service"
    :acParams="{ serviceName: 'ModuleService', interfaceName: 'FetchBugModule'}"
    valueitem=""
    :value="data.modulenameeq"
    editortype="dropdown"
    style=""
    @formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
                </template>
                <template v-if="Object.is(data.editor, 'modulenamelike')">
                    
<app-picker  
    :formState="formState"
    :data="data"
    :context="context"
    :viewparams="viewparams"
    :localContext ='{ }' 
    :localParam ='{ }' 
    :disabled="detailsModel.modulenamelike.disabled"
    name="modulenamelike"
    deMajorField="name"
    deKeyField="module"
    :service="service"
    :acParams="{ serviceName: 'ModuleService', interfaceName: 'FetchBugModule'}"
    valueitem=""
    :value="data.modulenamelike"
    editortype="dropdown"
    style=""
    @formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
                </template>
                <template v-if="Object.is(data.editor, 'openedbyeq')">
                    
<dropdown-list 
    v-model="data.openedbyeq"
    :data="data"
    :context="context"
    :formState="formState"
    :viewparams="viewparams"
    :localContext='{ }' 
    :localParam='{ }' 
    :disabled="detailsModel.openedbyeq.disabled"
    valueType="string"
    tag="UserRealName_Gird"
    codelistType="DYNAMIC"
    placeholder="请选择..."

></dropdown-list>
                </template>
                <template v-if="Object.is(data.editor, 'productnameeq')">
                    
<app-picker  
    :formState="formState"
    :data="data"
    :context="context"
    :viewparams="viewparams"
    :localContext ='{ }' 
    :localParam ='{ }' 
    :disabled="detailsModel.productnameeq.disabled"
    name="productnameeq"
    deMajorField="name"
    deKeyField="product"
    :service="service"
    :acParams="{ serviceName: 'ProductService', interfaceName: 'FetchCurUer'}"
    valueitem=""
    :value="data.productnameeq"
    editortype="dropdown"
    style=""
    @formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
                </template>
                <template v-if="Object.is(data.editor, 'productnamelike')">
                    
<app-picker  
    :formState="formState"
    :data="data"
    :context="context"
    :viewparams="viewparams"
    :localContext ='{ }' 
    :localParam ='{ }' 
    :disabled="detailsModel.productnamelike.disabled"
    name="productnamelike"
    deMajorField="name"
    deKeyField="product"
    :service="service"
    :acParams="{ serviceName: 'ProductService', interfaceName: 'FetchCurUer'}"
    valueitem=""
    :value="data.productnamelike"
    editortype="dropdown"
    style=""
    @formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
                </template>
                <template v-if="Object.is(data.editor, 'storynameeq')">
                    
<app-picker  
    :formState="formState"
    :data="data"
    :context="context"
    :viewparams="viewparams"
    :localContext ='{ }' 
    :localParam ='{ }' 
    :disabled="detailsModel.storynameeq.disabled"
    name="storynameeq"
    deMajorField="title"
    deKeyField="story"
    :service="service"
    :acParams="{ serviceName: 'StoryService', interfaceName: 'FetchCaseStory'}"
    valueitem=""
    :value="data.storynameeq"
    editortype="dropdown"
    style=""
    @formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
                </template>
                <template v-if="Object.is(data.editor, 'storynamelike')">
                    
<app-picker  
    :formState="formState"
    :data="data"
    :context="context"
    :viewparams="viewparams"
    :localContext ='{ }' 
    :localParam ='{ }' 
    :disabled="detailsModel.storynamelike.disabled"
    name="storynamelike"
    deMajorField="title"
    deKeyField="story"
    :service="service"
    :acParams="{ serviceName: 'StoryService', interfaceName: 'FetchCaseStory'}"
    valueitem=""
    :value="data.storynamelike"
    editortype="dropdown"
    style=""
    @formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
                </template>
            </template>
        </filter-tree>
    </div>
    <div class="search-bar-footer">
        <div class="search-bar-action">
            <el-select size="small" v-if="historyItems.length > 0" v-model="selectItem" @change="onFilterChange.apply(_self, arguments)">
                <el-option v-for="item in historyItems" :key="item.value" :label="item.name" :value="item.value"></el-option>
            </el-select>
            <i-button type="primary" @click="onSearch.apply(_self, arguments)">{{ $t('app.searchButton.search') }}</i-button>
            <i-button @click="onReset.apply(_self, arguments)">{{ $t('app.searchButton.reset') }}</i-button>
            <Poptip
                ref="propip"
                trigger="hover"
                transfer
                placement="top-end"
                :title="$t('app.searchForm.custom')"
                :width="250"
                @on-popper-show="openPoper.apply(_self, arguments)"
            >
                <i-button><i class="fa fa-floppy-o" aria-hidden="true"></i></i-button>
                <template slot="content">
                    <div>
                        <i-input v-model="saveItemName" :placeholder="$t('app.searchForm.title')"></i-input>
                        <div class="save-action">
                            <i-button @click="onCancel.apply(_self, arguments)">{{ $t('app.commonWords.cancel') }}</i-button>
                            <i-button type="primary" @click="onOk.apply(_self, arguments)">{{ $t('app.commonWords.save') }}</i-button>
                        </div>
                    </div>
                </template>
            </Poptip>
        </div>
    </div>
</div>